package com.hhh.tools.ui.screens

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import androidx.navigation.compose.rememberNavController
import com.hhh.tools.R
import com.hhh.tools.ui.theme.ComposeDemoTheme

@Preview
@Composable
fun PreviewMyPage() {
    val navController = rememberNavController()
    MyPage(navController)
}

@Composable
fun MyPage(navController: NavController) {
    ComposeDemoTheme {
        Row(
            Modifier
                .background(MaterialTheme.colors.background)
                .fillMaxSize()
        ) {
            Spacer(modifier = Modifier.height(60.dp))
            Column(
                Modifier
                    .background(MaterialTheme.colors.background)
                    .fillMaxWidth()
            ) {
                Spacer(modifier = Modifier.height(16.dp))
                Image(
                    painter = painterResource(id = R.mipmap.default_avatar4),
                    contentDescription = "头像",
                    modifier = Modifier
                        .size(56.dp)
                )
            }
        }
    }
}